package com.ftg.learn.chapter05;

/**
 * @author kangjx
 * @createTime 2022/6/30
 */
public class Item<T> {

    public Item(T val){
        this.setVal(val);
    }

    public Item(){}

    public Item(T val,Item next){
        this.setVal(val);
        this.setNext(next);
    }

    /**
     * 数据域
     */
    private T val;

    /**
     * 指针域 下一元素
     *
     */
    private Item<T> next;

    public T getVal() {
        return val;
    }

    public void setVal(T val) {
        this.val = val;
    }

    public Item<T> getNext() {
        return next;
    }

    public void setNext(Item next) {
        this.next = next;
    }
}
